import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { StudentLeaveVO, StudentLeaveForm, StudentLeaveQuery } from '@/api/attendance/leave/student/types';
import { StudentRecognitionRecordQuery, StudentRecognitionRecordVO } from './spot/types';
/**
 * 
 * @param query 查询检查项目
 * @returns 
 */
export const inspectioninspectItemslist = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
    return request({
      url: '/inspection/inspectItems/list',
      method: 'get',
      params: query
    });
};
/**
 * 
 * @param query 查询检查项目详情
 * @returns 
 */
export const inspectioninspectItemsdetail = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/inspectItems/'+query,
    method: 'get',
    // params: query
  });
};
/**
 * 
 * @param query 查询检查项目分类目录
 * @returns 
 */
export const searchinspectItemsCatalogue = (query?: { catalogueName: any; parentId: any; }): AxiosPromise<StudentRecognitionRecordVO[]> => {
    console.log("eeeee",query)
    return request({
      url: '/inspection/inspectItemsCatalogue/list',
      method: 'get',
      params: query
    });
};
/**
 * 
 * @param query 新增检查项目分类目录
 * @returns 
 */
export const inspectItemsCatalogue = (query?: { catalogueName: any; parentId: any; }): AxiosPromise<StudentRecognitionRecordVO[]> => {
    return request({
      url: '/inspection/inspectItemsCatalogue',
      method: 'post',
      data: query
    });
};
/**
 * 
 * @param query 新增检查项目分类目录
 * @returns 
 */
export const updateinspectItemsCatalogue = (query?: { catalogueName: any; parentId: any;catalogueId: any,  }): AxiosPromise<StudentRecognitionRecordVO[]> => {
    console.log("eeeee",query)
    return request({
      url: '/inspection/inspectItemsCatalogue',
      method: 'put',
      data: query
    });
};
/**
 * 
 * @param query 删除检查项目分类目录
 * @returns 
 */
export const deleteinspectItemsCatalogue = (id: string | number | Array<string | number>) => {
  console.log("dddd",id)
  return request({
    url: '/inspection/inspectItemsCatalogue/'+id,
    method: 'delete',
  });
};
/**
 * 
 * @param query 新增检查项目
 * @returns 
 */
export const addinspectItems = (query?: { catalogueName: any; parentId: any; }): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/inspectItems',
    method: 'post',
    data: query
  });
};
/**
 * 
 * @param query 修改检查项目
 * @returns 
 */
export const updateinspectItems = (query?: { catalogueName: any; parentId: any; }): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/inspectItems',
    method: 'put',
    data: query
  });
};
/**
 * 
 * @param query 删除检查项目
 * @returns 
 */
export const deleteinspectItems = (id:any) => {
  return request({
    url: '/inspection/inspectItems/'+id,
    method: 'delete',
  });
};
/**
 * 
 * @param query 检查情况
 * @returns 
 */
export const inspectSituationlist = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  console.log("eeeee",query)
  return request({
    url: '/inspection/inspectSituation/list',
    method: 'get',
    params: query
  });
};
/**
 * 
 * @param query 巡检点
 * @returns 
 */
export const inspectspotlist = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  console.log("eeeee",query)
  return request({
    url: '/inspection/spot/list',
    method: 'get',
    params: query
  });
};
/**
 * 
 * @param query 巡检任务
 * @returns 
 */
export const inspecttasklist = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/task/list',
    method: 'get',
    params: query
  });
};
/**
 * 
 * @param query 添加巡检任务
 * @returns 
 */
export const addinspecttask = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/task',
    method: 'post',
    data: query
  });
};
/**
 * 
 * @param query 删除巡检任务
 * @returns 
 */
export const deleteinspecttask = (id: string | number | Array<string | number>) => {
  return request({
    url: '/inspection/task/'+id,
    method: 'delete',
    // data: query
  });
};
/**
 * 
 * @param query 更新巡检任务
 * @returns 
 */
export const updateinspecttask = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/task',
    method: 'put',
    data: query
  });
};
/**
/inspection/task
/**
 * 
 * @param query 查询巡检任务详情
 * @returns 
 */
export const searchspecttaskdetail =  (id: string | number | Array<string | number>)  => {
  return request({
    url: '/inspection/task/'+id,
    method: 'get',
    // params: query
  });
};
/**
/inspection/task
/**
 * 
 * @param query 巡检执行人任务
 * @returns 
 */
export const userlist = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/system/user/list',
    method: 'get',
    params: query
  });
};
/**
 * 
 * @param query 查询任务类型目录
 * @returns 
 */
export const searchtasktypelist = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/taskType/list',
    method: 'get',
    params: query
  });
};
/**
 * 
 * @param query 添加任务类型目录
 * @returns 
 */
export const addtasktype = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/taskType',
    method: 'post',
    data: query
  });
};
/**
 * 
 * @param query 修改任务类型目录
 * @returns 
 */
export const updatetasktype = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/taskType',
    method: 'put',
    data: query
  });
};
/**
 * 
 * @param query 删除任务类型目录
 * @returns 
 */
export const deletetasktype = (id: string | number | Array<string | number>) => {
  return request({
    url: '/inspection/taskType/'+id,
    method: 'delete',
    // data: query
  });
};
/**
 * 
 * @param query 检查统计
 * @returns 
 */
export const inspectSituationstatlist = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/inspectSituation/stat',
    method: 'get',
    params: query
  });
};
//查询任务统计
export const searchinspectiontask = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/task/stat',
    method: 'get',
    params: query
  });
};
/**
 * 
 * @param query 导出任务统计
 * @returns 
 */
export const exportstat = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/task/exportstat',
    method: 'post',
    data: query
  });
};
/**
 * 
 * @param query 智能巡检统计
 * @returns 
 */
export const AipatrolRecord = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/patrolRecord/stat',
    method: 'get',
    params: query
  });
};
/**
 * 
 * @param query 完成月报
 * @returns 
 */
export const pageMothList = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/inspectSituation/pageMothList',
    method: 'get',
    params: query
  });
};
/**
 * 
 * @param query 巡检统计
 * @returns 
 */
export const pageIsZHTJList = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/inspectSituation/pageIsZHTJList',
    method: 'get',
    params: query
  });
};
/**
 * 
 * @param query 巡检记录
 * @returns 
 */
export const patrolRecordList = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/patrolRecord/list',
    method: 'get',
    params: query
  });
};
/**
 * 
 * @param query 执行情况
 * @returns 
 */
export const planExecutelist = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/inspection/planExecute/list',
    method: 'get',
    params: query
  });
};
/**
 * 
 * @param query 部门
 * @returns 
 */
export const deptdept = (query?: any): AxiosPromise<StudentRecognitionRecordVO[]> => {
  return request({
    url: '/system/dept/list',
    method: 'get',
    params: query
  });
};
/**
 * 
 * @param query 查询巡检单详情
 * @returns 
 */
export const getRecordC2Vo =  (id: string | number | Array<string | number>)  => {
  return request({
    url: '/inspection/patrolRecord/getRecordC2Vo/'+id,
    method: 'get',
    // params: query
  });
};

